The idea of blackjack is to win. In the simplest terms, to win you must have a higher card score than the dealer has, as long as your card score is not greater than 21. Cards are scored thus :
number cards - value is the number, eg. seven of clubs = 7
picture cards - 10, eg. queen of hearts = 10
ace cards - either 1 or 11. By default the value of an ace is 11. If your card score
rises above 21, each ace you have been dealt is given the value 1, until
your score is equal to, or less than 21 once more.
A game of blackjack is divided into “hands”, where the dealer deals each player two cards. ( In my implementation the computer is the dealer ).
Before a hand can begin you must select what you wish to bet on this hand. See the file “How to Use Strip BlackJack” to find out how to do it within my game. Once you have selected your bet, click on the deal button. The dealer gives you, the "player"; and themself, the "dealer", two cards. The first card that the dealer has is face down, so that you cannot see its value. If you were paying attention to the player and dealer balances, you may have noticed that the values went down the amount of the bet. If the dealer had a balance less than the bet, they will have a negative balance now. This is OK, you agree to extend the dealer enough credit to cover your bets in the flimsy plot portrayed in the “How to Use Strip BlackJack” file. Nothing is going wrong as long as the game conforms to this :
• at the END of a hand ( when you may change your bet ), this formula should be true :
where nudity_level is how nude the dealer is, ( starting from 0 )
Now, that you have been dealt a hand, several of the “action buttons” may be visible, ( unless you were dealt a Blackjack, in which case, the hand is already over. A BlackJack payoff is ${ 3/2 * bet }. Both the player and the dealer will get their bets back, then the dealer gives you your winnings ).
The “action buttons”, and when they may be enabled, are detailed below.
“Stay” - this button is enabled throughout the hand. Selecting this button, means you are happy with the cards that have been dealt to you this hand and are not going to request any more. The dealer then plays. How does the dealer play the hand ? If they have a total less than 17, they keep hitting, ( see next section ). If they have a total greater than or equal to 17 they must stay. These are casino blackjack rules as I understand it. Note that if you have a total of 13 and the dealer has 15, the dealer must still keep hitting until they get a total greater than 17 even though they're already beating you.
“Hit” - this button is enabled when your score is less than or equal to 21. Selecting hit causes you to be dealt another card. If your total gets greater than 21 ( you went “bust”, or have "busted" ), the hand is over, and the dealer reveals their hidden card. There is no need for the dealer to play out the hand.
“Split” - this button is enabled when the two cards you have been dealt are of equal value. Selecting split causes your current hand to be “split”, and you play two hands. The first new hand’s first card is the first card you were dealt. The second new hand’s first card is the second card you were dealt. You must have the same bet for each hand. So, if you were beating $10 and selected split, all up you are now betting $20. Player and Dealer Balances are deducted accordingly. Note that this button will not be enabled if you don’t have enough funds to play two hands. Also, if you split when you have been dealt two aces, you are only able to receive one more card for each hand.
The sequence of the game here goes like this : you are dealt two cards of equal value, you click on split, you play the first hand - when you are happy click stay ( unless you split on aces whereupon you are dealt another card and that hand is over ), you play the second hand - when you are happy click stay ( unless you split on aces ), the dealer then plays their hand ( unless you went bust on both ), the game determines who won which hand and distributes the money accordingly.
“Double” - this is enabled when you are first dealt your hand, and disappears if you select “hit” first. Selecting double means you wish to bet that you can beat the dealer when you are dealt only one more card. Doubling, also requires doubling your bet, so it may not be enabled if you can’t afford it. Note that you can “double” on individual split hands. If you double on one hand, it does not affect the amount you have bet for the other hand.
“Insurance” - this is enabled when the dealer is displaying an ace. Choosing insurance says that you wish to bet that the dealer has a blackjack. You may only choose this before you choose any of the other button options. Once you do choose it, you are able to continue playing out the hand as normal. Note that the insurance bet is half of the table bet, if you are unable to afford it, the insurance button will not be enabled.
If at the end of the hand, your balance is less than the minimum bet of $5, you lose. The dealer puts all their clothes back on and the game is over.
If at the end of the hand, the dealer’s balance is less than the minimum bet of $5, they strip off a layer of clothing and you pay them $200 from your stock of money, ( not from your balance ). If they don’t have any clothes left, then you have won and you are really cool.
If the dealer has stripped off a layer of clothing, and their balance is $400 or greater, they will buy back as many layers of clothing from you that they can afford for $200 each. Each $200 payment goes back into your stock of money, ( not your balance ).